home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / dasv10_.arj / USEMOUSE.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-10  |  503 b   |  28 lines

  1. //demo program of dmouse.lib functions
  2. #include <iostream.h>
  3.  
  4. //function prototypes
  5. int initmouse(void);
  6. void showmouse(void);
  7. void hidemouse(void);
  8. void getmouse(int *,int *,int *);
  9.  
  10. void main()
  11. {//begin main
  12.  
  13.     int mx, my, button;
  14.     initmouse();
  15.     showmouse();
  16.     cout<<"\n";
  17.  
  18.     while (button!=3){//begin while
  19.     getmouse(&mx, &my, &button);
  20.     hidemouse();
  21.     cout<<"X: "<<mx<<" Y: "<<my<<" BUTTON: "<<button<<"  \r";
  22.     showmouse();
  23.     hidemouse();
  24. }//end while
  25. cout<<"\n";
  26. }//end main
  27.  
  28.